buildToolbar = function(item, toolbar) {
  toolbar.addButton(item.toLowerCase(), item, item);
  toolbar.setItemImage(item.toLowerCase(), item+'.png');
  toolbar.attachEvent("onClick", function(id) {
    menuButtons(id);
  });
}

menuButtons = function(id) {
  var url = window.location.protocol + "//" + window.location.hostname + "/";
  if (id == 'home') {
    var path = url;
  } else {
    var path = url + id.toLowerCase();
  }

  window.location = path;
  return;
}
